diff options
Diffstat (limited to 'src/routes/invoice/[id].js')
| -rw-r--r-- | src/routes/invoice/[id].js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes/invoice/[id].js b/src/routes/invoice/[id].js new file mode 100644 index 00000000..a58d02a1 --- /dev/null +++ b/src/routes/invoice/[id].js @@ -0,0 +1,14 @@ +import { get } from '$lib/utils'; + +export async function GET({ params }) { + let { id } = params; + let { + amount, + rate, + status, + text, + user: { username } + } = await get(`/invoice?uuid=${id}`); + + return { body: { amount, id, rate, username, status, text } }; +} |
